package com.mz361.stdapi.domain;

import com.mz361.common.enums.StatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * 标准数据实体类
 *
 * @author niceale
 * @date 2024/04/30
 */

@Data
@Entity
//@Table(name = "tb_standard_0821")
//@EntityListeners(AuditingEntityListener.class)
//@Where(clause = StatusUtil.NOT_DELETE)
@Document(indexName = "standard_info", shards = 1, replicas = 0)
public class StandardTable {
    // 主键ID
    @Id
    @Field(type = FieldType.Keyword)
    private Long id;
    @ApiModelProperty(notes = "标准实施时间")
    private String fn_A205;
    private String fn_A210;//作废日期
    @ApiModelProperty(notes = "发布时间")
    private String fn_ModiDate;
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "标题")
//    @IndexField(value = "fn_A301")
    private String fn_A301;
    private String fn_AdoptLevel;//采标方式，1,3,ceshi,IDT,MOD
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "英文标题")
    private String fn_A302;
    @ApiModelProperty(notes = "标准简介")
    private String fn_ownerDept;
    @ApiModelProperty(notes = "标准号")
    @Column(unique = true)
//    @IndexField(value = "fn_A100")
    private String fn_A100;
    private String fn_StandPreNo;//标准编码，编号前类型部分
    private String fn_A107;//标准编号，编号前半部分
    private String fn_A225;//标准编号，编号后半部分
    @ApiModelProperty(notes = "标准状态")
//    @IndexField(value = "fn_StandStatus")
    private String fn_StandStatus;
    @ApiModelProperty(notes = "出版语种")
    private String fn_Language;
    private String fn_HavePaper;//是否有纸质版]
    private String fn_HavePDF;//是否有电子版
    // 国际标准分类号
    @ApiModelProperty(notes = "国际标准分类号")
    private String fn_A404;//国际标准分类号
    // 中国标准分类号
    @ApiModelProperty(notes = "中国标准分类号")
    private String fn_A825;
    // 替代以下的标准
    @ApiModelProperty(notes = "替代以下的标准")
    @Field(type = FieldType.Keyword)
    private String fn_A461;
    // 被替代的标准
    @ApiModelProperty(notes = "被替代的标准")
    @Field(type = FieldType.Keyword)
    private String fn_A462;
    // 引用的标准
    @ApiModelProperty(notes = "引用的标准")
    @Field(type = FieldType.Keyword)
    private String fn_ReferStandNo;
    //行业分类
    //采用的标准
    @ApiModelProperty(notes = "采用的标准")
    @Field(type = FieldType.Keyword)
    private String fn_AdoptNo;//采标编号
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    private String fn_AdoptDesc;//采标描述
    //页数
    @ApiModelProperty(notes = "页数")
    private String fn_A305;
    //字数
    @ApiModelProperty(notes = "字数")
    private String fn_wordCount;
    //开本
    @ApiModelProperty(notes = "开本")
    private String fn_format;

    @ApiModelProperty(notes = "价格")
    private Double fn_price;
    //起草者
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "起草者")
//    @IndexField(value = "fn_draftsMan")
    private String fn_draftsMan;
    //起草单位
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "起草单位")
//    @IndexField(value = "fn_draftsDept")
    private String fn_draftsDept;
    //归口单位
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "归口单位")
    private String fn_CommitteeDesc;
    //提出部门
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "提出部门")
    private String fn_SueDepart;
    //发布部门
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_smart")
    @ApiModelProperty(notes = "发布部门")
    private String fn_publish;
    //    @IndexField(value = "fn_ccsMark")
    private String fn_ccsMark;
    private String fn_icsMark;
    @Field(type = FieldType.Keyword)
    private String fn_ccs;
    @Field(type = FieldType.Keyword)
    private String fn_ics;
    private String fn_file;
    //    @IndexField(value = "fn_StandClass")
    private String fn_StandClass;//一级分类
    //    @IndexField(value = "fn_StandType")
    private String fn_StandType;//二级分类

    private String fn_printNumber;
    private String update_time;
    // 数据状态
    private Byte status = StatusEnum.OK.getCode();


}
